<?php

namespace Crm\Controller;

/**
 * RoleController控制器
 *
 * @author SoChishun <14507247@qq.com>
 * @version 1.0
 * @since 1.0.0 <2015-3-24> by SoChishun Added.
 */
class RoleController extends AppbaseController {

    public function assert_upr($rule = '') {
        
    }

    /**
     * role_index操作
     * @since 1.0.0 <2015-3-25> SoChishun Added.
     */
    public function role_list() {
        $this->base_common_treetable_list('角色', 'Role');
    }

    public function role_edit($id = 0) {
        $this->base_common_treetable_edit('角色', 'Role', $id);
    }

    public function role_edit_save() {
        $result = D('Role')->save_item();
        $this->base_redirect_return($result, U('Role/role_list'));
    }

    // 角色删除操作 2015-3-25 SoChishun Added.
    public function role_delete($id = 0) {
        $this->base_common_delete($id, 'Role');
    }

}
